package edu.asu.sapa.sas;

public class Atom {

	protected String name;
	/** associated variable */
	protected Variable var;
	/** value from the given variable */
	protected int value = -1;
	/** associated predicate ID in SPUDS */
	protected int sapaPred = -1;
	/** associated utility */
	protected float utility;
	
	public Atom(Variable var, String name, int value) {
		this.var = var;
		this.name = name;
		this.value = value;
	}
	
	public void setUtility(float utility) {
		this.utility = utility;
	}
	
	public int getValue() {
		return value;
	}
	

	public Variable getVariable() {
		return var;
	}
	
	public void setPredID(int pred) {
		sapaPred = pred;
	}
	
	public int getPredID() {
		return sapaPred;
	}
	
	public float getUtility() {
		return utility;
	}

	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		return value + ": " + name;
	}
}
